import { insertComponentCssLink } from "../../util/insert-style";
export function createCard(options, width = '100px', height = '150px') {
    const { name, image, description, price, index,count } = options;

    insertComponentCssLink("cuisines-card")
    const content = /*HTML*/`<div class="card" style="width: 250px; height: auto;">
        <img src="${image}" class="card-img-top" alt="${name}">
        <div class="card-body">
            <h5 class="card-title">${name}</h5>
            <p class="card-text">${description}</p>
            <p class="card-text"><strong>价格: ${price}</strong></p>
            
           <div class="d-flex justify-content-evenly">
            <button class="btn btn-primary " id="add" data-i="${index}">加入餐盘</button>
            <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-success">
           ${count}
           
          </span>
        
            <button class="btn btn-primary " id="reduction" data-i="${index}">取消</button>
           </div>
           
            
        </div>
    </div>`

    return content;
}

